import { param } from '@/utils'
// import http from '@/utils/request'
import request from '@/utils/request'

/**
 * 用户登录方法
 * @param {*} data
 * @returns
 */
export async function login(data) {
  return request({
    url: '/sysUser/login',
    method: 'post',
    data
  })
}

/**
 * 获取登录用户信息
 * @param {*} token
 * @returns
 */
export async function getInfo() {
  return request({
    url: '/vue-element-admin/user/info',
    method: 'get',
    params: { token }
  })
  // return await http.get('/keshe/api/sysUser/getInfo')
}

/**
 *
 * @returns
 */
export async function logout(params) {
  return request({
    url: '/sysUser/logout',
    data:params,
    method: 'post'
  })
  // return await http.post('/keshe/api/sysUser/logout',params)
}
